import { RootThunkAction } from '@/types/store'
import { http } from '@/utils/http'

// 登录 action
// 定义 login 接口的传参类型
type LoginParams = { mobile: string; code: string }

export const login = (value: LoginParams): RootThunkAction => {
  return async dispatch => {
    // 发起登录网络请求
    const res = await http.post('/authorizations', value)
    console.log('登录res==>', res)

    // 发action
  }
}
